myApp.factory('$brand', ['$q', '$http', function($q, $http){
	var brand = {
		allBrand: [{"name": "数据还没初始化！"}],
		loadAllBrand: function() {
			var defer = $q.defer();
			$http.get('searchAllBrand').then(function successCallback(response) {
				defer.resolve(response.data);
			}, function errorCallback(response) {
				console.log("fail：" + response);
			});
			return defer.promise;
		}
	}; 
	return brand;
}]);